<form class="form-horizontal form-validate form-modal" method="post" id="_post_form" action="{:url('info')}">
 <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal">&times;</button>
                <h4 class="modal-title">{$row['role_id'] > 0?'编缉角色':'添加角色'}</h4>
            </div>
            <div class="modal-body tableinfo">
{eq name="row.is_sys" value="1"}   
系统默认角色不能修改
{else/}        
 <table border="0" cellpadding="0" cellspacing="0" width="100%" >
  <tr>
    <td width="100" align="right">角色名称：</td>
    <td><input name="role_name" type="text" value="{$row.role_name}" data-msg-required="角色名称不能为空" data-rule-required="true"/><span class="red">*</span></td>
  </tr>
  <tr>
    <td align="right">排序：</td>
    <td><input name="sort_order"  type="text" value="{$row.sort_order|intval}" /></td>
  </tr>
  <tr>
    <td align="right">角色说明：</td>
    <td><textarea name="info" id="info"  class="input-max">{$row.info}</textarea></td>
  </tr>
	
  {volist name="menuList" id="va"}
     <tbody class="purview_box">
           <tr >
              <td  valign="top"><label><strong>{$va.name}</strong></label></td>
                <td valign="top">
                    {volist name="va.list" id="vb"}
                        {if condition="empty($vb['submenu']) &&  empty($vb['right']) == false" }
                        	 {if condition="$vb['right'] == 'manage'" }
                          			<label><input name="role_action[]" type="checkbox" {:in_array($vb.group.'|'.$vb.controller.'|'.$vb.right,$row['role_action'])?'checked':''} value="{$vb.group}|{$vb.controller}|{$vb.right}" /> {$vb.name}</label>                                  
                              {/if}                              
                        {/if}
                    {/volist}
                </td>
           </tr>
            {volist name="va.list" id="vb"}
                {if condition="empty($vb['submenu'])==false || empty($vb['right']) == false" }
                      <tr>
                      {if condition="empty($vb['submenu'])==false" }
                          <td align="right" valign="top"> <label>{$vb.name}：</label></td>
                          <td valign="top">
                            {volist name="vb.submenu" id="vc"}
                                 {if condition="$vc['right'] == 'manage' || $vc['right'] == 'download'" }
                            		 <label><input name="role_action[]" type="checkbox" {:in_array($vc.group.'|'.$vc.controller.'|'.$vc.right,$row['role_action'])?'checked':''} value="{$vc.group}|{$vc.controller}|{$vc.right}" /> {$vc.name}</label>
                                 {elseif condition="empty($vc['_right'])==false" }
                                     <div><label>{$vc.name}：</label>
                                     {volist name="vc._right" id="right"}
                                          <label><input name="role_action[]" type="checkbox" {:in_array($vc.group.'|'.$vc.controller.'|'.$right,$row['role_action'])?'checked':''} value="{$vc.group}|{$vc.controller}|{$right}" /> {$purviewArr[$right]}</label>
                                     {/volist}
                                     </div>
                                 {/if}
                            {/volist}
                        	</td>
                      {/if}
          			  </tr>
                 {/if}
             {/volist}
      </tbody>   
    {/volist}
</table>
    <input type="hidden" pkid name="role_id" value="{$row.role_id|intval}">
 			
        </div>
         <div class="modal-footer">
                <button type="submit" class="btn btn-primary" data-loading-text="保存中..."  ><i class="fa fa-edit"></i>保存</button>
                <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
            </div>
            
{/eq}         
    </div>
</div>
</form>
